#include <cstdio>
#include <cstring>
#include <queue>

using pair = std::pair<int, int>;

const int N = 2e2 + 5, M = 2e2 + 5;
int n, m, q, dis[N], ndis[N];
int e_cnt, heads[N];

struct Edge {
  int v, nxt, w;
};
Edge e[M << 1];
inline void add(int u, int v, int w) {
  e[++e_cnt].v = v, e[e_cnt].nxt = heads[u], heads[u] = e_cnt, e[e_cnt].w = w;
}

std::priority_queue<pair, std::vector<pair>, std::greater<pair> > pq;

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("fee.in", "r", stdin);
  freopen("fee.out", "w", stdout);
#endif
#endif

  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1, u, v, w; i <= m; ++i) {
    scanf("%d%d%d", &u, &v, &w);
    add(u, v, w);
    add(v, u, w);
  }
  memset(dis, 0x3f, sizeof(dis));
  memset(ndis, 0x3f, sizeof(ndis));
  pq.push(std::make_pair(0, 1));
  dis[1] = 0;
  while (!pq.empty()) {
    int u = pq.top().second, d = pq.top().first;
    pq.pop();
    if (dis[u] != d) continue;
    for (int i = heads[u], v; i; i = e[i].nxt) {
      if (dis[v = e[i].v] > dis[u] + e[i].w) {
        dis[v] = dis[u] + e[i].w;
        pq.push(std::make_pair(dis[v], v));
      }
    }
  }
  pq.push(std::make_pair(0, n));
  ndis[n] = 0;
  while (!pq.empty()) {
    int u = pq.top().second, d = pq.top().first;
    pq.pop();
    if (ndis[u] != d) continue;
    for (int i = heads[u], v; i; i = e[i].nxt) {
      if (ndis[v = e[i].v] > ndis[u] + e[i].w) {
        ndis[v] = ndis[u] + e[i].w;
        pq.push(std::make_pair(ndis[v], v));
      }
    }
  }
  for (int t, x, tmp; q; --q) {
    scanf("%d%d", &t, &x);
    tmp = e[t << 1].w;
    e[t << 1].w = e[(t << 1) - 1].w = x;
    printf("%d\n",
           std::min(dis[n],
                    x + std::min(dis[e[t << 1].v] + ndis[e[(t << 1) - 1].v],
                                 dis[e[(t << 1) - 1].v] + ndis[e[t << 1].v])));
  }
  return 0;
}